require 'Comm/Functions'

WWW = UnityEngine.WWW
GameObject = UnityEngine.GameObject


SQLite = SQLiteExtension.SQLite
Util = LuaFramework.Util
AppConst = LuaFramework.AppConst
-- LuaHelper = LuaFramework.LuaHelper

resMgr = ResManager.Instance
audioMgr = AudioManager.Instance
luaMgr = LuaFramework.LuaManager.Instance

---@type LuaFramework.AssetBundleManager
abMgr = LuaFramework.AssetBundleManager.Instance

--主入口函数。从这里开始lua逻辑
function Main()					
	print("logic start")	

	-- EnterApp("mainapp/mainapp_selectpage.unity3d", "MainApp_SelectPage" )

end

function EnterApp(bundleUrl, sceneName)
	abMgr:LoadAsset(bundleUrl,function(asset)
		UnityEngine.SceneManagement.SceneManager.LoadScene(sceneName)
		end);
end

--场景切换通知
function OnLevelWasLoaded(level)
	collectgarbage("collect")
	Time.timeSinceLevelLoad = 0
end